package lanxing.future.base.chapter10;

/**
 * @author <a href="mailto:lanxing@chances.com.cn">lanxing</a>
 * @version 2019年7月26日
 *
 */
public class DotThis {

    public void f() {
        System.out.println("dotthis.f()");
        
    }
    
    class Inner {
        
        public DotThis outer() {
            return DotThis.this;
        }
    }
    
    public Inner getInner() {
        return new Inner();
    }
    
    public static void main(String[] args) {
        //Inner inner = DotThis.new Inner();  
        
        DotThis dotThis = new DotThis();
        Inner inner = dotThis.getInner();
        
        inner.outer().f();
        
        
        //create directly by other obj self
        DotThis.Inner inner2 = dotThis.new Inner();
        inner2.outer().f();
        
    }
}
